Numeric and text paging with an integral PLC modem

ABSTRACT

At least one exemplary embodiment of the present invention includes a method comprising formatting a message at a first modem integral to a first programmable logic controller, and transmitting the formatted message from the first modem via a communications network. At least one exemplary embodiment of the present invention includes a system comprising a means for formatting a message at a modem integral to a programmable logic controller, and means for transmitting the formatted message from the modem via a communications network. It is emphasized that this abstract is provided to comply with the rules requiring an abstract that will allow a searcher or other reader to quickly ascertain the subject matter of the technical disclosure. This abstract is submitted with the understanding that it will not be used to interpret or limit the scope or meaning of the claims. 37 CFR 1.72(b).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to, and incorporates by referenceherein in its entirety, the following pending provisional applications:

-   -   Ser. No. 60/346,438, filed 7 Jan. 2002;    -   Ser. No. 60/341,386, filed 18 Dec. 2001;    -   Ser. No. 60/341,539, filed 18 Dec. 2001; and    -   Ser. No. 60/341,384, filed 18 Dec. 2001.

This application is related to, and incorporates by reference herein inits entirety, the following co-pending applications:

-   -   Ser. No. 10/272115, titled “Modem Function Incorporated in A        Programmable Logic Controller”, filed 16 Oct.2002;    -   Ser. No. 10/271921, titled “PLC to PLC Communications with a        Modem on the PLC I/O Bus”, filed 16 Oct. 2002; and    -   Ser. No. 10/272114, titled “Security Features for a PLC Modem”,        filed 16 Oct. 2002.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention and its wide variety of potential embodiments will bereadily understood via the following detailed description of certainexemplary embodiments, with reference to the accompanying drawings inwhich:

FIG. 1 is a block diagram of an exemplary embodiment of a system 1000 ofthe present invention;

FIG. 2 is a block diagram of an exemplary embodiment of an informationdevice 2000 of the present invention;

FIG. 3 is a flowchart of an exemplary embodiment of a method 3000 of thepresent invention;

FIG. 4 is a flowchart of an exemplary embodiment of a method 4000 of thepresent invention;

FIG. 5 is a flowchart of an exemplary embodiment of a method 5000 of thepresent invention;

FIG. 6 is a flowchart of an exemplary embodiment of a method 6000 of thepresent invention;

FIG. 7 is a flowchart of an exemplary embodiment of a method 7000 of thepresent invention;

FIG. 8 is a top view of an exemplary EM 241 modem module 8000 of thepresent invention;

FIG. 9 is a screen shot of exemplary graphical user interfaces 9000 ofthe present invention;

FIG. 10 is a screen shot of exemplary graphical user interfaces 10000 ofthe present invention; and

FIG. 11 is a screen shot of exemplary graphical user interfaces 11000 ofthe present invention.

DETAILED DESCRIPTION

At least one exemplary embodiment of the present invention includes asystem comprising a modem adapted to be integrated into a programmablelogic controller and adapted to facilitate communications with a mainprocessor of the programmable logic controller via a communicationsmedium. At least one exemplary embodiment of the present inventionincludes a method comprising receiving a message from a main processorof a programmable logic controller, modulating the message within theprogrammable logic controller, and transmitting the message via acommunications network. At least one exemplary embodiment of the presentinvention includes a method comprising receiving a message at aprogrammable logic controller from a communications network,demodulating the message within the programmable logic controller, anddelivering the message to a main processor of the programmable logiccontroller.

At least one exemplary embodiment of the present invention includes asystem comprising a first modem integral to a first programmable logiccontroller, and a second modem integral to a second programmable logiccontroller, the first modem adapted to communicate with the second modemvia a communications network. At least one exemplary embodiment of thepresent invention includes a method comprising coupling a first modem toa second modem, the first modem integral to a first programmable logiccontroller, the second modem connected to a second programmable logiccontroller, and transferring data between the first modem and the secondmodem.

At least one exemplary embodiment of the present invention includes amethod comprising formatting a message at a first modem integral to afirst programmable logic controller, and transmitting the formattedmessage from the first modem via a communications network. At least oneexemplary embodiment of the present invention includes a systemcomprising a means for formatting a message at a modem integral to aprogrammable logic controller, and means for transmitting the formattedmessage from the modem via a communications network.

At least one exemplary embodiment of the present invention includes amethod comprising receiving a connection request at a modem integral toa programmable logic controller, and allowing access to the programmablelogic controller via the modem. At least one exemplary embodiment of thepresent invention includes a method comprising establishing a connectionbetween a calling device and a modem integral to a programmable logiccontroller, and allowing the calling device access to the programmablelogic controller via the modem.

FIG. 1 is a block diagram of an exemplary embodiment of a system 1000 ofthe present invention. System 1000 can include a first programmablelogic controller (“PLC”) 1100 comprising a main processor 1120 coupledvia a connector 1130 to a modem 1140. In certain embodiments, modem 1140can connect to a connector 1300 such as a system backplane and/or anexpansion input/out bus, thereby freeing a communication port ofprocessor 1200.

Modem 1140 can be integral to PLC 1100. That is, once installed, modem1140 can be a component of PLC 1100, rather than free-standing. Modem1140 can include a communications processor 1150 having a data storagemeans 1160, such as a dual port RAM, and a communications interface1170, such as a telephone line interface, a wireless network interface,a cellular network interface, a local area network interface, abroadband cable interface, etc. Modem 1140 can form a connection, and/orcan receive, read, process, format, configure, modulate, demodulate,transmit, and/or deliver a message, which can include data. Modem 1140can be modular in design, having its own chassis, and can draw powerfrom connector 1130 and/or PLC 1100.

Modem 1140 can be connected to a communications network 1200, such as apublic service telephone network (PSTN), a wireless network, a cellularnetwork, a local area network, the Internet, etc. Also connected tonetwork 1200 can be a second PLC 1300, which can also have an integralmodem 1320, which can be coupled via connector 1330 to a main processor1340.

Connected to network 1200 also can be a first information device 1400,such as a traditional telephone, telephonic device, cellular telephone,mobile terminal, Bluetooth device, communicator, pager, facsimile,computer terminal, personal computer, etc. Moreover, a secondinformation device 1500 can be connected to network 1200, and the secondinformation device 1500 can communicate with a third information device1600 either via network 1200 or via a second network 1520.

FIG. 2 is a block diagram of an exemplary embodiment of an informationdevice 2000 of the present invention. Information device 2000 canrepresent any information device 1400, 1500, or 1600 of FIG. 1.Information device 2000 can include well-known components such as one ormore network interfaces 2100, one or more processors 2200, one or morememories 2300 containing instructions 2400, and/or one or moreinput/output (I/O) devices 2500, etc.

In one embodiment, network interface 2100 can be a telephone, a cellularphone, a cellular modem, a telephone data modem, a fax modem, a wirelesstransceiver, an ethernet card, a cable modem, a digital subscriber lineinterface, a bridge, a hub, a router, or other similar device.

Each processor 2200 can be a general purpose microprocessor, such thePentium III series of microprocessors manufactured by the IntelCorporation of Santa Clara, Calif. In another embodiment, the processorcan be an Application Specific Integrated Circuit (ASIC) or a FieldProgrammable Gate Array (FPGA) which has been designed to implement inits hardware and/or firmware at least a part of a method in accordancewith an embodiment of the present invention.

Memory 2300 can be coupled to a processor 2200 and can storeinstructions 2400 adapted to be executed by processor 2200 according toone or more activities of a method of the present invention. Memory 2300can be any device capable of storing analog or digital information, suchas a hard disk, Random Access Memory (RAM), Read Only Memory (ROM),flash memory, a compact disk, a digital versatile disk (DVD), a magnetictape, a floppy disk, and any combination thereof.

Instructions 2400 can be embodied in software, which can take any ofnumerous forms that are well-known in the art.

Any input/output (I/O) device 2500 can be an audio and/or visual device,including, for example, a monitor, display, keyboard, keypad, touchpad,pointing device, microphone, speaker, video camera, camera, scanner,and/or printer, including a port to which an I/O device can be attachedor connected.

FIG. 3 is a flowchart of an exemplary embodiment of a method 3000 of thepresent invention. At activity 3100, a message is received from the mainprocessor of the PLC at the integral modem of the PLC. At activity 3200,the message is processed by the modem. At activity 3300, the processedmessage is modulated, and at activity 3400, the modulated message istransmitted over a communications network, such as a telephone network.The modulated message can conform to any of numerous configurations,protocols, and/or standards. For example, the modulated message can be a10 bit, V.34, ASCII, TAP message.

FIG. 4 is a flowchart of an exemplary embodiment of a method 4000 of thepresent invention. At activity 4100, a message is received at theintegral modem of the PLC via a network. At activity 4200, the messageis demodulated. At activity 4300, the demodulated message is processedby the modem. At activity 3400, the processed message is delivered to amain processor of the PLC.

FIG. 5 is a flowchart of an exemplary embodiment of a method 5000 of thepresent invention. At activity 5100, a modem integral to a first PLC canbe coupled to a modem of a second PLC. The modem of the second PLC canbe integral to the second PLC or separate from the second PLC. Atactivity 5200, the modem of the first PLC can modulate data, and atactivity 5300, transmit the modulated data to the modem of the secondPLC. Upon receiving the modulated data, the modem of the second PLC candemodulate the data and respond accordingly, such as by processingand/or forwarding the data to a processor of the second PLC, or byreplying to the modem of the first PLC. At activity 5500, the modem ofthe first PLC can be de-coupled from the modem of the second PLC.

FIG. 6 is a flowchart of an exemplary embodiment of a method 6000 of thepresent invention. At activity 6100, a modem integral to a PLC canreceive a message specification from a processor of the PLC. In someexemplary embodiments, the message can be a paging messagespecification. At activity 6200, the modem can read the messagespecification. At activity 6300, the modem can determine a device toattempt to access, such as by dialing a telephone number included in themessage specification. At activity 6400, the modem can identify one ormore data variables in the message specification. At activity 6500, themodem can obtain, format, and place the data values corresponding to thespecified data variables into a message. At activity 6600, the modem canapply one or more message configuration(s) to the message as defined bythe message specification and/or other configuration defining means,such as DIP switches, firmware, etc. For example, the modem can applyany of numerous pre-selected formats, modem standards, and/or protocolsto the message. At activity 6700, the modem can transmit the message viaa communications network, possibly in accordance with the messagespecification and/or message configuration(s), to a pagable deviceand/or a communications device, such as a telephone, a cellular phone, a“smart” phone (such as a Handspring Treo-like device), a pager, a pagingservice, a messaging service (e.g., Blackberry), a computer terminal, apersonal computer, a personal organizer (such as a Palm-like device), awireless device, a mobile terminal, etc.

FIG. 7 is a flowchart of an exemplary embodiment of a method 7000 of thepresent invention. At activity 7100, a connection request from a callingdevice can be received by a modem that is integral to a PLC. At activity7200, the modem can request a username and/or password from the callingdevice. At activity 7300, the modem can receive a username and/orpassword. At activity 7400, the modem can verify the received usernameand/or password, and if verified, can acknowledge the verification.

At activity 7500, the modem can obtain a call-back telephone number fromthe calling device and/or from a storage device, such as a memory or adatabase. At activity 7600, the modem can verify the call-back number,perhaps by comparing a call-back number received from a calling devicewith a call-back number obtained from storage. At activity 7700, themodem can allow the connection, by establishing the connection, byplacing a connection request, and/or by calling a pre-programmedcall-back number. At activity 7800, the modem can allow the callingdevice to access the PLC.

Certain exemplary embodiments of the present invention include a modemmodule that allows a PLC to connect directly to an analog telephoneline. Certain exemplary embodiments of the modem module are sometimesreferred to herein as the EM 241 Modem module, and certain exemplaryembodiments of the PLC are sometimes referred to herein as the S7-200.

Certain exemplary embodiments of the present invention can supportcommunications between the PLC and a PLC programming tool, one exemplaryembodiment of which is at times referred to herein as the STEP7-Micro/WIN. Certain exemplary embodiments of the present inventioninclude a modem module that supports the Modbus slave RTU protocol.Communications between the EM 241 Modem module and the PLC can be madeover an Expansion I/O bus of the PLC.

The PLC programming tool can provide a software wizard to help set up aremote modem or a modem module for connecting a local PLC to a remotedevice.

Features of the EM 241 Modem Module

FIG. 8 is a top view of an exemplary EM 241 Modem module 8000, which caninclude a housing 8100, a series of indicator lights 8200, which can beused for displaying a status of module 8000; a connector 8300, which canbe used for connecting the module to a PLC interface, such as aninput/output expansion bus; one or more country code switches 8400,which can be used for configuring module 8000 for a particular country;and/or communications network interface 8500, such as an RJ11 jack. Theone or more country code switches 8400 can be manually accessible, andcan be coupled to firmware that reads a country code from at least oneof switches 8400 and configures modem 8000 for country specificoperation.

The following description applies to certain embodiments of EM 241 Modemmodule 8000, but should not be viewed as limiting.

The EM241 Modem Module can expand the functionality of the S7-200 MicroPLC into remote communications. Four Modes are supported by the Module:

-   -   (a) Mode 1 is for Micro/WIN programming and debugging. In        certain embodiments, no setup is required. Instead, just Plug &        Play.    -   (b) Mode 2 is for Modbus Master/Slave Communication.    -   (c) Mode 3 is for Alpha-Numeric Messaging and Numeric Paging.    -   (d) Mode 4 is for CPU-to-CPU Communications, such as between        S7-200 Micro PLCs.

Moreover, the EM241 Modem Module can provide the following features:

-   -   (e) It can directly connect to the S7-200's Expansion I/O bus        eliminating the need to tie up the CPU's communications port.    -   (f) Connection of an S7-200 PLC directly to an analog telephone        line.    -   (g) Baud Rates can be self-negotiating dependent on Line Quality        adjustable between 300 Baud and 33.6 kBaud (V.34bis).    -   (h) Provides international telephone line interface.    -   (i) Many country standards can be supported by the hardware        rotary switches. All other settings can be stored in the PLC's        variable memory.    -   (j) Pulse or Tone Dialing can be supported.    -   (k) A modem interface to STEP 7-Micro/WIN for programming and        troubleshooting (teleservice).    -   (l) Support for the Modus RTU protocol.    -   (m)CPU-to-CPU or CPU-to-Modbus data transfer.    -   (n) Support for numeric and text paging.    -   (o) Support for SMS messaging.    -   (p) Support for Callback Function and/or Password Protection.

The EM 241 Modem module configuration can be stored in the CPU. The STEP7-Micro/WIN Modem Expansion wizard can be used to configure the EM 241Modem module.

International Telephone Line Interface

The EM 241 Modem module can be a standard V.34 (33.6 kBaud), 10-bitmodem, and can be compatible with most internal and external PC modems.

The EM 241 Modem module can be connected to the telephone line with thesix-position four-wire RJ11 connector mounted on the front of the moduleas shown in FIG. 8. When viewed from the front, RJ11 connector can beconfigured such that pin 3 provides Ring, and pin 4 provides Tip.Reverse connection can also be allowed.

In certain situations, an adapter can be used to convert the RJ11connector for connection to the standard telephone line termination inthe various countries.

The modem and telephone line interface can be powered from an external24V DC supply. This power source can be connected to the CPU sensorsupply or to an external power source. The ground terminal on the EM 241Modem module can be connected the system earth ground.

The EM 241 Modem module can automatically configure the telephoneinterface for country-specific operation when power is applied to themodule. The two rotary switches on the front of the module select thecountry code. In some embodiments, the switches can be set to thedesired country selection before the EM 241 Modem module is powered upas shown in Table 1.

TABLE 1 Countries Supported by the EM 241 Switch Setting Country 01Austria 02 Belgium 05 Canada 08 Denmark 09 Finland 10 France 11 Germany12 Greece 16 Ireland 18 Italy 22 Luxembourg 25 Netherlands 27 Norway 30Portugal 34 Spain 35 Sweden 36 Switzerland 38 U.K. 39 U.S.A.STEP 7-Micro/WIN Interface

The EM 241 Modem module can allow communication with STEP 7-Micro/WINover a telephone line (teleservice). It is not necessary to configure orprogram the S7-200 CPU to use the EM 241 Modem module as the remotemodem when used with STEP 7-Micro/WIN.

The following steps can be followed to use the EM 241 Modem module withSTEP 7-Micro/WIN:

-   -   (q) Remove the power from the S7-200 CPU and attach the EM 241        Modem module to the I/O expansion bus. Do not attach any I/O        modules while the S7-200 CPU is powered up.    -   (r) Connect the telephone line to the EM 241 Modem module.    -   (s) Connect 24 volts DC to the EM 241 Modem module terminal        blocks.    -   (t) Connect the EM 241 Modem module terminal block ground        connection to the system ground.    -   (u) Set the country code switches.    -   (v) Power up the S7-200 CPU and the EM 241 Modem module.    -   (w) Configure STEP 7-Micro/WIN to communicate to a 10-bit modem.        Modbus RTU Protocol

The EM 241 Modem module can be configured to respond as a Modbus RTUslave. In this situation, the EM 241 Modem module receives Modbusrequests over the modem interface, interprets those requests, andtransfers data to or from the CPU. The EM 241 Modem module thengenerates a Modbus response and transmits it out over the modeminterface.

In certain embodiments, if the EM 241 Modem module is configured torespond as a Modbus RTU slave, STEP 7-Micro/WIN is not able tocommunicate to the EM 241 Modem module over the telephone line.

The EM 241 Modem module can support the Modbus functions shown in Table2.

TABLE 2 Modbus Functions Supported by Modem Module Function DescriptionFunction 01 Read coil (output) status Function 02 Read input statusFunction 03 Read holding registers Function 04 Read input (analog input)registers Function 05 Write single coil (output) Function 06 Presetsingle register Function 15 Write multiple coils (outputs) Function 16Preset multiple registers

Modbus functions 4 and 16 can allow reading or writing a maximum of 125holding registers (250 bytes of V memory) in one request. Functions 5and 15 can write to the output image register of the CPU. These valuescan be overwritten by a user program.

Modbus addresses can be written as 5 or 6 character values containingthe data type and the offset. In this situation, the first one or twocharacters can determine the data type, and the last four characters canselect the proper value within the data type. The Modbus master devicecan map the addresses to the correct Modbus functions.

Table 3 shows the Modbus addresses supported by the EM 241 Modem module,and the mapping of Modbus addresses to the S7-200 CPU addresses.

TABLE 3 Mapping Modbus Addresses to the S7-200 CPU Modbus Address S7-200CPU Address 000001 Q0.0 000002 Q0.1 000003 Q0.2 . . . . . . 000127 Q15.6000128 Q15.7 010001 |0.0 010002 |0.1 010003 |0.2 . . . . . . 010127|15.6 010128 |15.7 030001 AIW0 030002 AIW2 030003 AIW4 . . . . . .030032 AIW62 040001 VW0 040002 VW2 040003 VW4 . . . . . . 04xxxx VW2*(xxxx-1)

The Modem Expansion wizard can be used to create a configuration blockin the EM 241 Modem module to support Modbus RTU protocol. The EM 241Modem module configuration block can be downloaded to the CPU data blockbefore use of the Modbus protocol.

Paging and SMS Messaging

The EM 241 Modem module can support sending numeric and text pagingmessages SMS (Short Message Service) messages to cellular phones (wheresupported by the cellular provider). The messages and telephone numberscan be stored in the EM 241 Modem module configuration block which canbe downloaded to the data block in the S7-200 CPU.

The Modem Expansion wizard can be used to create the messages andtelephone numbers for the EM 241 Modem module configuration block. TheModem Expansion wizard also can create the program code to allow aprogram to initiate the sending of the messages.

Numeric Paging

Numeric paging can use the tones of a touch tone telephone to sendnumeric values to a pager. The EM 241 Modem module can dial therequested paging service, wait for the voice message to complete, andsend the tones corresponding to the digits in the paging message. Thedigits 0 through 9, asterisk (*), A, B, C and D can be allowed in thepaging message. The actual characters displayed by a pager for theasterisk and A, B, C, and D characters can be determined by the pagerand the paging service provider.

Text Paging

Text paging can allow alphanumeric messages to be transmitted to apaging service provider, and from there to a pager. Text pagingproviders normally have a modem line that accepts text pages. The EM 241Modem module can use Telelocator Alphanumeric Protocol (TAP) to transmitthe text messages to the service provider. Many providers of text paginguse this protocol to accept messages.

Short Message Service (SMS)

Short Message Service (SMS) messaging is supported by some cellulartelephone services, including those that are GSM compatible. SMS canallow the EM 241 Modem module to send a message over an analog telephoneline to an SMS provider. The SMS provider can then transmit the messageto the cellular telephone, and the message can appear on the textdisplay of the telephone. The EM 241 Modem module can use theTelelocator Alphanumeric Protocol (TAP) and/or the Universal ComputerProtocol (UCP) to send messages to the SMS provider.

Embedded Variables in Text and SMS Messages

The EM 241 Modem module can embed data values from the CPU in the textmessages and can format the data values based on a specification in themessage. A user can specify the number of digits to the left and rightof the decimal point, and whether the decimal point is a period or acomma. When the user program commands the EM 241 Modem module totransmit a text message, the EM 241 Modem module can retrieve themessage from the CPU, determine what CPU values are needed within themessage, retrieve those values from the CPU, and/or format and place thevalues within the text message before transmitting the message to theservice provider.

The telephone number of the messaging provider, the message, and thevariables embedded within the message can be read from the CPU overmultiple CPU scan cycles. The variables embedded within a message cancontinue to be updated during the sending of a message. If a messagecontains multiple variables, those variables can be read over multiplescan cycles of the CPU.

Data Transfers

The EM 241 Modem module can allow a user program to transfer data toanother CPU or to a Modbus device over the telephone line. The datatransfers and telephone numbers can be configured with the ModemExpansion wizard, and can be stored in the EM 241 Modem moduleconfiguration block. The configuration block can be downloaded to thedata block in the S7-200 CPU. The Modem Expansion wizard also can createprogram code to allow a user program to initiate the data transfers.

A data transfer can be either a request to read data from a remotedevice, or a request to write data to a remote device. A data transfercan read or write between 1 and 100 words of data. Data transfers canmove data to or from the V memory of the attached CPU.

The Modem Expansion wizard can allow a user to create a data transferconsisting of a single read from the remote device, a single write tothe remote device, or both a read from and a write to the remote device.

Data transfers can use the configured protocol of the EM 241 Modemmodule. If the EM 241 Modem module is configured to support PPI protocol(where it responds to STEP 7-Micro/WIN), the EM 241 Modem module can usethe PPI protocol to transfer data. If the EM 241 Modem module isconfigured to support the Modbus RTU protocol, data transfers can betransmitted using the Modbus protocol.

The telephone number of the remote device, the data transfer request,and the data being transferred can be read from the CPU over multipleCPU scan cycles. Generally, a user program does not modify telephonenumbers or messages while a message is being sent, or modify the databeing transferred while a message is being sent.

If the remote device is another Modem module, the password function canbe used by the data transfers by entering the password of the remoteModem module in the telephone number configuration.

Password Protection

The password security of the EM 241 Modem module can be optional and canbe enabled with the Modem Expansion wizard. In certain embodiments, thepassword used by the EM 241 Modem module is not the same as the CPUpassword. Instead, the EM 241 Modem module password can be a separatepassword containing, for example, 8-characters, that the caller cansupply to the EM 241 Modem module before being allowed access to theattached CPU. The password can be stored in the V memory of the CPU aspart of the EM 241 Modem module configuration block. The EM 241 Modemmodule configuration block can be downloaded to the data block of theattached CPU.

If the CPU has the password security enabled in the System Data Block,the caller can supply the CPU password to gain access to passwordprotected functions.

Security Callback

The callback function of the EM 241 Modem module can be optional and canbe configured with the Modem Expansion wizard. The callback function canprovide additional security for the attached CPU by allowing access tothe CPU only from predefined telephone numbers. When the callbackfunction is enabled, the EM 241 Modem module can answer any incomingcalls, verify the caller, and then disconnect the line. If the caller isauthorized, the EM 241 Modem module then can dial a predefined telephonenumber for the caller, and allow access to the CPU.

The EM 241 Modem module can support three callback modes:

-   -   (a) Callback to a single predefined telephone number    -   (b) Callback to multiple predefined telephone numbers    -   (c) Callback to any telephone number.

The callback mode can be selected by checking the appropriate option inthe Modem Expansion wizard and then defining the callback telephonenumbers. The callback telephone numbers can be stored in the EM 241Modem module configuration block stored in the data block of theattached CPU.

The simplest form of callback is to a single predefined telephonenumber. If only one callback number is stored in the EM 241 Modem moduleconfiguration block, whenever the EM 241 Modem module answers anincoming call, it can notify the caller that callback is enabled,disconnect the caller, and dial the callback number specified in theconfiguration block.

The EM 241 Modem module can also support callback for multiplepredefined telephone numbers. In this mode, the caller can be asked fora telephone number. If the supplied number matches one of the predefinedtelephone numbers in the EM 241 Modem module configuration block, the EM241 Modem module can disconnect the caller, and call back using thematching telephone number from the configuration block. The user canconfigure up to 250 callback numbers.

Where there are multiple predefined callback numbers, numerous schemesare possible. In certain embodiments, the callback number supplied whenconnecting to the EM 241 Modem module is an exact match of the number inthe configuration block of the EM 241 Modem module except for the firsttwo digits. For example, if the configured callback is 91(123)4569999because of a need to dial an outside line (9) and long distance (1), thenumber supplied for the callback could be any of the following:

-   -   (a) 91(123)4569999    -   (b) 1(123)4569999    -   (c) (123)4569999

All of the above telephone number can be considered to be a callbackmatch. The EM 241 Modem module can use the callback telephone numberfrom its configuration block when performing the callback, in thisexample 91(123)4569999. In certain embodiments, only the numericcharacters in a telephone number are used when comparing callbacknumbers. Characters such as commas or parenthesis can be ignored whencomparing callback numbers.

The callback to any telephone number can be set up in the ModemExpansion wizard by selecting the “Enable callbacks to any phone number”option during the callback configuration. If this option is selected,the EM 241 Modem module can answer an incoming call and request acallback telephone number. After the telephone number is supplied by thecaller, the EM 241 Modem module can disconnect and dial that telephonenumber. This callback mode can provide a means to allow telephonecharges to be billed to the EM 241 Modem module's telephone connectionand does not necessarily provide security for the S7-200 CPU. The EM 241Modem module password can be used for security if this callback mode isused.

The EM 241 Modem module password and callback functions can be enabledat the same time. The EM 241 Modem module can requires a caller tosupply the correct password before handling the callback.

Configuration Table for the EM 241 Modem Module

All of the text messages, telephone numbers, data transfer information,callback numbers and other options can be stored in a Modem moduleconfiguration table which can be loaded into the V memory of the S7-200CPU. The Modem Expansion wizard can guide a user through the creation ofa Modem module configuration table. STEP 7-Micro/WIN then can place theEM 241 Modem module configuration table in the Data Block which can bedownloaded to the S7-200 CPU.

The EM 241 Modem module can read this configuration table from the CPUon startup and within five seconds of any STOP-to-RUN transition of theCPU. The EM 241 Modem module does not necessarily read a newconfiguration table from the CPU as long the EM 241 Modem module isonline with STEP 7-Micro/WIN. If a new configuration table is downloadedwhile the EM 241 Modem module is online, the EM 241 Modem module canread the new configuration table when the online session is ended.

If the EM 241 Modem module detects an error in the configuration table,the Module Good (MG) LED on the front of the module can flash on andoff. A user can check the PLC Information screen in STEP 7-Micro/WIN, orread the value in SMW220 (for module slot 0) for information about theconfiguration error. The EM 241 Modem module configuration errors arelisted in Table 4. If a user utilizes the Modem Expansion wizard tocreate the EM 241 Modem module configuration table, STEP 7-Micro/WIN cancheck the data before creating the configuration table.

TABLE 4 EM 241 Configuration Errors (Hexadecimal) Error Description 0000No error 0001 No 24 VDC external power 0002 Modem failure 0003 Noconfiguration block ID - The EM 241 identification at the start of theconfiguration table is not valid for this module. 0004 Configurationblock out of range - The configuration table pointer does not point to Vmemory, or some part of the table is outside the range of V memory forthe attached CPU. 0005 Configuration error - Callback is enabled and thenumber of callback telephone numbers equals 0 or it is greater than 250.The number of messages is greater than 250. The number of messagingtelephone numbers is greater than 250, or if length of the messagingtelephone numbers is greater than 120 bytes. 0006 Country selectionerror - The country selection on the two rotary switches is not asupported value. 0007 Phone number too large - Callback is enabled andthe callback number length is greater than the maximum. 0008 to 00FFReserved 01xx Error in callback number xx - There are illegal charactersin callback telephone number xx. The value xx is 1 for the firstcallback number, 2 for the second, etc. 02xx Error in telephone numberxx - One of the fields in a message telephone number xx or a datatransfer telephone number xx contains an illegal value. The value xx is1 for the first telephone number, 2 for the second, etc. 03xx Error inmessage xx - Message or data transfer number xx exceeds the maximumlength. The value xx is 1 for the first message, 2 for the second, etc.0400 to FFFF ReservedStatus LEDs of the EM 241 Modem Module

The EM 241 Modem module can have 8 status LEDs on the front panel. Table5 the status LEDs.

TABLE 5 EM 241 Status LEDs LED Description MF Module Fail - This LED ison when the module detects a fault condition such as: H No 24 VDCexternal power H Timeout of the I/O watchdog H Modem failureH Communications error with the local CPU MG Module Good - This LED ison when there is no module fault condition. The Module Good LED flashesif there is a error in the configuration table, or the user has selectedan illegal country setting for the telephone line interface. Check thePLC information screen in STEP 7-Micro/WIN or read the value in SMW220(for module slot 0) for information about the configuration error. OHOff Hook - This LED is on when the EM 241 is actively using thetelephone line. NT No Dial Tone - This LED indicates an error conditionand turns on when the EM 241 has been commanded to send a message andthere is no dial tone on the telephone line. This is only an errorcondition if the EM 241 has been configured to check for a dial tonebefore dialing. The LED remains on for approximately 5 seconds after afailed dial attempt. RI Ring Indicator -This LED indicates that the EM241 is receiving an incoming call. CD Carrier Detect - This LEDindicates that a connection has been established with a remote modem. RxReceive Data - This LED flashes on when the modem is receiving data. TxTransmit Data - This LED flashes on when the modem is transmitting data.Using the Modem Expansion Wizard to Configure the EM 241 Modem Module

A user can start the Modem Expansion wizard from the STEP 7-Micro/WINTools menu or from the Tools portion of the Navigation Bar.

To use this wizard, the user's project is typically compiled and set toSymbolic Addressing Mode. On first screen of the Modem Expansion wizard,a user can select Configure an EM 241 Modem module and click Next>.

The Modem Expansion wizard can acquire the EM 241 Modem module'sposition relative to the S7-200 CPU in order to generate the correctprogram code. A user can click the Read Modules button to automaticallyread the positions of the intelligent modules attached to the CPU.Expansion modules can be numbered sequentially starting at zero. A usercan double-click the EM 241 Modem module to configure, or set the ModulePosition field to the position of the EM 241 Modem module.

The password protection screen allows a user to enable passwordprotection for the EM 241 Modem module and/or to assign a 1 to 8character password for the module. This password can be independent ofthe S7-200 CPU password. When the module is password-protected, anyonewho attempts to connect with the S7-200 CPU through the EM 241 Modemmodule can be required to supply the correct password. A user can selectpassword protection if desired, and enter a password.

The EM 241 Modem module can support two communications protocols: PPIprotocol (to communicate with STEP 7-Micro/WIN), and Modbus RTUprotocol. Protocol selection can be dependent on the type of device thatis being used as the remote communications partner. This setting cancontrol the communications protocol used when the EM 241 Modem moduleanswers a call and also when the EM 241 Modem module initiates a CPUdata transfer.

A user can configure the module to send numeric and text messages topagers, or Short Message Service (SMS) messages to cellular telephones.A user can check the Enable messaging checkbox and click the ConfigureMessaging . . . button to define messages and the recipient's telephonenumbers.

When setting up a message to be sent to a pager or cellular phone, auser can define the message and the telephone number. A user can selectthe Messages tab on the Configure Messaging screen and click the NewMessage button. A user then can enter the text for the message andspecify any CPU data values to insert into the message. To insert a CPUdata value into the message, a user can move the cursor to the positionfor the data and click the Insert Data . . . button. A user can specifythe address of the CPU data value (i.e. VW100), the display format (i.e.Signed Integer) and the digits left and right of the decimal point. Auser also can specify if the decimal point should be a comma or aperiod.

Numeric paging messages can be limited to the digits 0 to 9, the lettersA, B, C and D, and the asterisk (*). The maximum allowed length of anumeric paging message can vary by service provider. Text messages canbe up to 119 characters in length and contain any alphanumericcharacter. Text messages can contain any number of embedded variables.

Embedded variables can be from V, M, SM, I, Q, S, T, C or AI memory inthe attached CPU. Hexadecimal data can be displayed with a leading‘16#’. The number of characters in the value can be based on the size ofthe variable. For example, VW100 displays as 16#0123. The number ofdigits left of the decimal can be large enough to display the expectedrange of values, including the negative sign, if the data value is asigned integer or floating point value. If the data format is integerand the number of digits right of the decimal point is not zero, theinteger value can be displayed as a scaled integer. For example, ifVW100=1234 and there are 2 digits right of the decimal point, the datais displayed as ‘12.34’. If the data value is greater than can bedisplayed in the specified field size, the EM 241 Modem module can placethe # character in all character positions of data value.

Telephone numbers can be configured by selecting the Phone Numbers tabon the Configure Messaging screen. A user can click the New Phone Number. . . button to add a new telephone number. Once a telephone number hasbeen configured it can be added to the project. A user can highlight thetelephone number in the Available Phone Numbers column and click theright arrow box to add the telephone number to the current project. Oncea user has added the telephone number to the current project, the usercan select the telephone number and add a symbolic name for this numberto use in the user's program. The telephone number can consists ofseveral fields which can vary based on the type of messaging selected bythe user.

The Messaging Protocol selection can tell the EM 241 Modem module whichprotocol to use when sending the message to the message serviceprovider. Numeric pagers can support only numeric protocol. Text pagingservices can usually require TAP (Telelocator Alphanumeric Protocol).SMS messaging providers can be supported with either TAP or UCP(Universal Computer Protocol). There are three different UCP servicesnormally used for SMS messaging. Most providers support command 1 or 51.A user can check with the SMS provider to determine the protocol andcommands required by that provider.

The Description field can allow a user to add a text description for thetelephone number. The Phone Number field can be the telephone number ofthe messaging service provider. For text messages this can be thetelephone number of the modem line the service provider uses to accepttext messages. For numeric paging this can be the telephone number ofthe pager itself. The EM 241 Modem module can allow the telephone numberfield to be a maximum of 40 characters. The following characters can beallowed in telephone numbers that the EM 241 Modem module can use todial out:

0 to 9 allowed from a telephone keypad A, B, C, D, *, #  DTMF digits(tone dialing only) , pause dialing for 2 seconds ! generate a hookflash @ wait for 5 seconds of silence W wait for a dial tone beforecontinuing ( ) ignored (can be used to format the telephone number)

The Specific Pager ID or Cell Phone Number field is where a user canenter the pager number or cellular telephone number of the messagerecipient. Up to 20 characters can be included. The Password field canbe optional for TAP message. Some providers can require a password butnormally this field can be left blank. The EM 241 Modem module can allowthe password to be up to 15 characters.

The Originating Phone Number field can allow the EM 241 Modem module tobe identified in the SMS message. This field can be required by someservice providers which use UCP commands. Some service providers canrequire a minimum number of characters in this field. The EM 241 Modemmodule can allow up to 15 characters.

The Modem Standard field can be provided for use in cases where the EM241 Modem module and the service provider modem cannot negotiate themodem standard. The default can be V.34 (33.6 kBaud).

The Data Format fields can allow a user to adjust the data bits andparity used by the modem when transmitting a message to a serviceprovider. TAP can normally use 7 data bits and even parity, but someservice providers can use 8 data bits and no parity. UCP can use 8 databits with no parity. A user can check with the service provider todetermine which settings to use.

A user can configure the EM 241 Modem module to transfer data to anotherS7-200 CPU (if PPI protocol was selected) or to transfer data to aModbus device (if Modbus protocol was selected). A user can check theEnable CPU data transfers checkbox and click the Configure CPU-to . . .button to define the data transfers and the telephone numbers of theremote devices.

When setting up a CPU-to-CPU or a CPU-to-Modbus data transfer a user candefine the data to transfer and the telephone number of the remotedevice. To do so, a user can select the Data Transfers tab on theConfigure Data Transfers screen and click the New Transfer button. Adata transfer can consists of a data read from the remote device, a datawrite to the remote device, or both a read from and a write to theremote device. If both a read and a write are selected, the read can beperformed first and then the write.

Up to 100 words can be transferred in each read or write. Data transferscan be to or from the V Memory in the local CPU. The wizard can describethe memory locations in the remote device as if the remote device is anS7-200 CPU. If the remote device is a Modbus device, the transfer can beto or from holding registers in the Modbus device (address 04xxxx). Theequivalent Modbus address (xxxx) can be determined as follows:

Modbus address =1 + (V memory address / 2) V memory address =(Modbusaddress − 1) * 2

The Phone Numbers tab on the Configure CPU Data Transfers screen canallow a user to define the telephone numbers for CPU-to-CPU or aCPU-to-Modbus data transfers. A user can click the New Phone Number . .. button to add a new telephone number. Once a telephone number has beenconfigured it can be added to the project. A user can highlight thetelephone number in the Available Phone Numbers column and click theright arrow box to add the telephone number to the current project. Oncea user has added the telephone number to the current project, the usercan select the telephone number and add a symbolic name for thistelephone number to use in the user's program.

The Description and Phone Number fields are the same as describedearlier for messaging. The Password field can be required if the remotedevice is a Modem module and password protection has been enabled. ThePassword field in the local Modem module can be set to the password ofthe remote Modem module. The local Modem module can supply this passwordwhen it is requested by the remote Modem module.

Callback can cause the EM 241 Modem module to automatically disconnectand dial a predefined telephone number after receiving an incoming callfrom a remote STEP 7-Micro/WIN. A user can select the Enable callbackcheckbox and click the Configure Callback . . . button to configurecallback telephone numbers.

The Configure Callback . . . screen can allow a user to enter thetelephone numbers the EM 241 Modem module uses when it answers anincoming call. A user can check the ‘Enable callbacks to only specifiedphone numbers’ if the callback numbers are to be predefined. If the EM241 Modem module is to accept any callback number supplied by theincoming caller (to reverse the connection charges), a user can checkthe ‘Enable callbacks to any phone number’ selection.

If only specified callback telephone numbers are allowed, a user canclick the New Phone Number button to add callback telephone numbers. TheCallback Properties screen allows a user to enter the predefinedcallback telephone numbers and a description for the callback number.The callback number entered here can be the telephone number that the EM241 Modem module uses to dial when performing the callback. Thistelephone number can include all digits required to connect to anoutside line, pause while waiting for an outside line, connect to longdistance, etc.

After entering a new callback telephone number, it can be added to theproject. A user can highlight the telephone number in the AvailableCallback Phone Numbers column and click the right arrow box to add thetelephone number to the current project.

A user can set the number of dialing attempts that the EM 241 Modemmodule makes when sending a message or during a data transfer. Incertain embodiments, the EM 241 Modem module can report an error to theuser program only when all attempts to dial and send the message areunsuccessful.

Some telephone lines do not have a dial tone present when the telephonereceiver is lifted. The EM 241 Modem module can returns an error to theuser program if a dial tone is not present when the EM 241 Modem moduleis commanded to send a message or perform a callback. To allow dialingout on a line with no dial tone, a user can check the box, EnableDialing Without Dial Tone Selection.

The Modem Expansion wizard can create a configuration block for the EM241 Modem module and can require the user to enter the starting memoryaddress where the EM 241 Modem module configuration data is stored. TheEM 241 Modem module configuration block can be stored in V Memory in theCPU. STEP 7-Micro/WIN can write the configuration block to the projectData Block. The size of the configuration block can vary based on thenumber of messages and telephone numbers configured. A user can selectthe V Memory address where the configuration block is to be stored, orclick the Suggest Address button if the user wants the wizard to suggestthe address of an unused V Memory block of the correct size.

A final step in configuring the EM 241 Modem module can be to specifythe Q memory address of the command byte for the EM 241 Modem module. Auser can determine the Q memory address by counting the output bytesused by any modules with discrete outputs installed on the S7-200 beforethe EM 241 Modem module.

The Modem Expansion wizard can generate the project components for auser's selected configuration (program block and data block) and makethat code available for use by the user's program. The final wizardscreen can display the user's requested configuration projectcomponents. The user can download the EM 241 Modem module configurationblock (Data Block) and the Program Block to the S7-200 CPU.

Modem Instructions and Restrictions

The Modem Expansion wizard can make controlling the EM 241 Modem moduleeasier by creating unique instruction subroutines based on the positionof the module and configuration options selected by a user. Eachinstruction can be prefixed with a “MODx_” where x is the modulelocation.

Using the EM 241 Modem Module Instructions

Consider these guidelines when you use Modem module instructions:

-   -   (a) The EM 241 Modem module instructions can use three        subroutines.    -   (b) The EM 241 Modem module instructions can increase the amount        of memory required for a user's program by up to 370 bytes. If a        user deletes an unused instruction subroutine, the user can        rerun the Modem Expansion wizard to recreate the instruction if        needed.    -   (c) Typically, only one instruction should be active at a time.    -   (d) Typically, the instructions are not used in an interrupt        routine.    -   (e) The EM 241 Modem module can read the configuration table        information when it first powers up and after a STOP-to-RUN        transition. In certain embodiments, any change that the user        program makes to the configuration table is not seen by the        module until a mode change or the next power cycle.        Using the EM 241 Modem Module Instructions

A user can utilize the EM 241 Modem module instructions in the user'sS7-200 program, by completing the following steps:

-   -   a. Use the Modem Expansion wizard to create the EM 241 Modem        module configuration table.    -   b. Insert the MODx_CTRL instruction in the program and use the        SM0.0 contact to execute it every scan.    -   c. Insert a MODx_MSG instruction for each message needed to be        sent.    -   d. Insert a MODx_XFR instruction for each data transfer.        Instructions for the EM 241 Modem Module        MODx_CTRL Instruction

MODx_CTRL (Control) instruction can be used to enable and initialize theEM 241 Modem module. This instruction can be called every scan and, incertain embodiments, is used once in the project. FIG. 9 is a screenshot of graphical user interfaces 9000 that display certain MODx_CTRLinstructions.

MODx_XFR Instruction

MODx_XFR (Data Transfer) instruction can be used to command the EM 241Modem module to read and write data to another S7-200 CPU or a Modbusdevice. In certain embodiments, this instruction can take 20 to 30seconds from the time the START input is triggered until the Done bit isset. FIG. 10 is a screen shot of graphical user interfaces 10000 thatdisplay certain MODx_XFR instructions.

The EN bit can be on to enable a command to the module, and can remainon until the Done bit is set, signaling completion of the process. AnXFR command can be sent to the EM 241 Modem module on each scan whenSTART input is on and the module is not currently busy. The START inputcan be pulsed on through an edge detection element, which only allowsone command to be sent.

Phone can be the number of one of the data transfer telephone numbers. Auser can utilize the symbolic name assigned to each data transfertelephone number when the number was defined with the Modem Expansionwizard.

Data can be the number of one of the defined data transfers. A user canuse the symbolic name assigned to the data transfer when the request wasdefined using the Modem Expansion wizard.

Done can be a bit that comes on when the EM 241 Modem module completesthe data transfer.

Error can be a byte that contains the result of the data transfer. Table6 lists a number of possible error conditions that could result fromexecuting this instruction.

TABLE 6 Parameters for the MODx_XFR Instruction Input/Outputs Data TypeOperands START BOOL I, Q, M, S, SM, T, C, V, L, Power Flow Phone, DataBYTE VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD Done BOOLI, Q, M, S, SM, T, C, V, L Error BYTE VB, IB, QB, MB, SB, SMB, LB, AC,*VD, *AC, *LDMODx_MSG Instruction

The MODx_MSG (Send Message) instruction can be used to send a paging orSMS message from Modem module. In certain embodiments, this instructioncan take 20 to 30 seconds from the time the START input is triggereduntil the Done bit is set. FIG. 11 is a screen shot of graphical userinterfaces 11000 that display certain MODx_MSG instructions. Table 7provides various parameter for the MODx-MSG instruction.

TABLE 7 Parameters for the MODx_MSG Instruction Input/Outputs Data TypeOperands START BOOL I, Q, M, S, SM, T, C, V, L, Power Flow Phone, MsgBYTE VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD Done BOOLI, Q, M, S, SM, T C, V, L Error BYTE VB, IB, QB, MB, SB, SMB, LB, AC,*VD, *AC, *LD

The EN bit is typically on to enable a command to the module, and canremain on until the Done bit is set, signaling completion of theprocess. A MSG command can be sent to the EM 241 Modem module on eachscan when START input is on and the module is not currently busy. TheSTART input can be pulsed on through an edge detection element, whichonly allows one command to be sent.

Phone can be the number of one of the message telephone numbers. A usercan use the symbolic name assigned to each message telephone number thewhen the number was defined with the Modem Expansion wizard.

Msg can be the number of one of the defined messages. A user can use thesymbolic name assigned to the message when the message was defined usingthe Modem Expansion wizard.

Done can be a bit that comes on when the EM 241 Modem module completesthe sending of the message to the service provider.

Error can be a byte that contains the result of this request to themodule. Table 8 defines a number of possible error conditions that couldresult from executing this instruction.

TABLE 8 Error Values Returned by MODx_MSG and MODx_XFR InstructionsError Description  0 No error Telephone line errors  1 No dial tonepresent  2 Bus line  3 Dialing error  4 No answer  5 Connect timeout (noconnection within 1 minute)  6 Connection aborted or an unknown responseErrors in the command  7 Numeric paging message contains illegal digits 8 Telephone number (Phone input) out of range  9 Message or datatransfer (Msg or Data input) out of range 10 Error in text message ordata transfer message 11 Error in messaging or data transfer telephonenumber 12 Operation not allowed (i.e. attempts set to zero) Serviceprovider errors 13 No response (timeout) from messaging service 14Message service disconnected for unknown reason 15 User aborted message(disabled command bit) TAP - Text paging and SMS message errors returnedby service provider 16 Remote disconnect received (service provideraborted session) 17 Login not accepted by message service (incorrectpassword) 18 Block not accepted by message service (checksum ortransmission error) 19 Block not accepted by message service (unknownreason) UCP - SMS message errors returned by service provider 20 Unknownerror 21 Checksum error 22 Syntax error 23 Operation not supported bysystem (illegal command) 24 Operation not allowed at this time 25 Callbarring active (blacklist) 26 Caller address invalid 27 Authenticationfailure 28 Legitimization code failure 29 GA not valid 30 Repetition notallowed 31 Legitimization code for repetition, failure 32 Priority callnot allowed 33 Legitimization code for priority call, failure 34 Urgentmessage not allowed 35 Legitimization code for urgent message, failure36 Reverse charging not allowed 37 Legitimization code for reversecharging, failure 38 Deferred delivery not allowed 39 New AC not valid40 New legitimization code not allowed 41 Standard text not valid 42Time period not valid 43 Message type not supported by system 44 Messagetoo long 45 Requested standard text not valid 46 Message type not validfor pager type 47 Message not found in SMSC 48 Reserved 49 Reserved 50Subscriber hang up 51 Fax group not supported 52 Fax message type notsupported Data transfer errors 53 Message timeout (no response fromremote device) 54 Remote CPU busy with upload or download 55 Accesserror (memory out of range, illegal data type) 56 Communications error(unknown response) 57 Checksum or CRC error in response 58 Remote EM 241set for callback (not allowed) 59 Remote EM 241 rejected the providedpassword 60 to 127 Reserved Instruction use errors 128  Cannot processthis request. Either the Modem module is busy with another request, orthere was no START pulse on this request. 129  Modem module error: H Thelocation of the Modem module or the Q memory address that was configuredwith the Modem Expansion wizard does not match the actual location ormemory address H Refer to SMB8 to SMB21 (I/O Module ID and ErrorRegister)Sample Program for the EM 241 Modem Module

Table 9 provides a sample program for the EM 241 Modem module.

TABLE 9 Example: Modem Module

S7-200 CPUs that Support Intelligent Modules

The EM 241 Modem module can be an intelligent expansion module designedto work with the S7-200 CPUs shown in Table 10.

TABLE 10 EM 241 Modem Module Compatibility with S7-200 CPUs CPUDescription CPU 222 Rel. 1.10 or greater CPU 222 DC/DC/DC CPU 222AC/DC/Relay CPU 224 Rel. 1.10 or greater CPU 224 DC/DC/DC CPU 224AC/DC/Relay CPU 226 Rel. 1.00 or greater CPU 226 DC/DC/DC CPU 226AC/DC/Relay CPU 226XM Rel. 1.00 or greater CPU 226XM DC/DC/DC CPU 226XMAC/DC/RelaySpecial Memory Location for the EM 241 Modem Module

Fifty bytes of special memory (SM) can be allocated to each intelligentmodule based on its physical position in the I/O expansion bus. When anerror condition or a change in status is detected, the module canindicate this by updating the SM locations corresponding to the module'sposition. If it is the first module, it can update SMB200 through SMB249as needed to report status and error information. If it is the secondmodule, it can update SMB250 through SMB299, and so on as shown in Table11.

TABLE 11 Special Memory Bytes SMB200 to SMB549 Intelligent IntelligentIntelligent Intelligent Intelligent Intelligent Intelligent Module inModule in Module in Module in Module in Module in Module in Slot 0 Slot1 Slot 2 Slot 3 Slot 4 Slot 5 Slot 6 SMB200 to SMB250 to SMB300 toSMB350 to SMB400 to SMB450 to SMB500 to SMB249 SMB299 SMB349 SMB399SMB449 SMB499 SMB549

The Special memory data area, which can be allocated for the EM 241Modem module, is shown in Table 12. This area can be defined as if thiswere the intelligent module located in Slot 0 of the I/O system.

TABLE 12 SM Locations for the EM 241 Modem Module SM Address DescriptionSMB200 to Module name (16 ASCII characters) SMB200 is the firstcharacter. SMB215 “EM241 Modem” SMB216 to S/W revision number (4 ASCIIcharacters) 5MB216 is the first character. SMB219 5MW220 Error code0000 - No error 0001 - No user power 0002 - Modem failure 0003 - Noconfiguration block ID 0004 - Configuration block out of range 0005 -Configuration error 0006 - Country code selection error 0007 - Phonenumber too large 0008 - Message too large 0009 to 00FF - Reserved 01xx -Error in callback number xx 02xx - Error in pager number xx 03xx - Errorin message number xx 0400 to FFFF - Reserved SMB222 Module status -reflects the LED status

F- EM_FAULT 0- no fault 1- fault G- EM_GOOD 0- notgood 1- good H-OFF_HOOK 0- on hook, 1- off hook T- NO DIALTONE 0- dial tone 1- no dialtone R- RING 0- not ringing 1- phone ringing C- CONNECT 0- not connected1- connected SMB223 Country code as set by switches (decimal value)SMW224 Baud rate at which the connection was established (unsigneddecimal value). SMB226 Result of the user command

D- Done bit; 0 - operation in progress 1 - operation complete ERROR:Error Code Description, see Table 1 8 SMB227 Telephone number selector -This byte specifies which messaging telephone number to use when sendinga message. Valid values are 1 through 250. SMB22B Message selector -This byte specifies which message to send. Valid values are 1 through250. SMB229 to Reserved SMB244 SMB245 Offset to the first Q byte used asthe command interface to this module. The offset is supplied by the CPUfor the convenience of the user and is not needed by the module. SMD246Pointer to the configuration table for the Modem module in V memory. Apointer value to an area other than V memory is not accepted and themodule continues to examine this location, waiting for a non-zeropointer value.Additional TopicsUnderstanding the Configuration Table

The Modem Expansion wizard can be developed to automatically generatethe configuration table based upon the answers given about a system. Thefollowing configuration table information is provided for advanced userswho want to create their own Modem module control routines and formattheir own messages.

The configuration table can be located in the V memory area of theS7-200. As shown in Table 13, the Byte Offset column of the table can bethe byte offset from the location pointed to by the configuration areapointer in SM memory. The configuration table information can be dividedinto four sections.

-   -   (a) The Configuration Block can contain information to configure        the module.    -   (b) The Callback Telephone Number Block can contain the        predefined telephone numbers allowed for callback security.    -   (c) The Message Telephone Number Block can contain the telephone        numbers used when dialing messaging services or CPU data        transfers.    -   (d) The Message Block can contain the predefined messages to        send to the messaging services.

TABLE 13 Configuration Table for the Modem Module Byte OffsetDescription Configuration Block 0 to 4 Module Identification - FiveASCII characters used for association of the configuration table to anintelligent module. Release 1.00 of the EM 241 Modem module expects“M241A”. 5 The length of the Configuration Block - Currently 24. 6Callback telephone number length - Valid values are 0 through 40. 7Messaging telephone number length - Valid values are 0 through 120. 8Number of callback telephone numbers - Valid values are 0 through 250. 9Number of messaging telephone numbers - Valid values are 0 through 250.10  Number of messages - Valid values are 0 through 250. 11 to 12Reserved (2 bytes) 13  This byte contains the enable bits for thefeatures supported.

PD - 0 = tone dialing 1 = pulse dialing CB - 0 = callback disabled 1 =callback enabled PW - 0 = password disabled 1 = password enabled MB - 0=PPI protocol enabled 1 = Modbus protocol enabled BD - 0 = blind dialingdisabled 1 = blind dialing enabled Bits 2, 1 and 0 are ignored by themodule 14  Reserved 15  Attempts - This value specifies the number oftimes the modem is to attempt to dial and send a message beforereturning an error. A value of 0 prevents the modem from dialing out. 16to 23 Password - Eight ASCII characters Callback Telephone Number Block(optional) 24  Callback Telephone Number 1 - A string representing thefirst telephone number that is authorized for callback access from theEM 241 Modem module. Each callback telephone number must be allocatedthe same amount of space as specified in the callback telephone numberlength field (offset 6 in the Configuration Block). 24 + callbackCallback Telephone Number 2 number . . . . . . . Callback TelephoneNumber n . . Messaging Telephone Number Block (optional) M MessagingTelephone Number 1 - A string representing a messaging telephone numberwhich includes protocol and dialing options. Each telephone number mustbe allocated the same amount of space as specified in the messagingtelephone number length field (offset 7 in the Configuration Block). Themessaging telephone number format is described below M + messagingMessaging Telephone Number 2 number length . . . . . . . MessagingTelephone Number n . . Message Block (optional) N V memory offset(relative to VB0) for the first message (2 bytes) N + 2 Length ofmessage 1 N + 3 Length of message 2 . . . . . . . Length of message n .. P Message 1 - A string (120 bytes max.) representing the firstmessage. This string includes text and embedded variable specificationsor it could specify a CPU data transfer. See the Text Message Format andthe CPU Data Transfer Format described below. P + length of Message 2message 1 . . . . . . . Message n . .

The EM 241 Modem module can re-read the configuration table when theseevents occur:

-   -   (a) Within five seconds of each STOP-to-RUN transition of the        S7-200 CPU (unless the modem is currently online);    -   (b) Every five seconds until a valid configuration is found        (unless the modem is currently online);    -   (c) Every time the modem transitions from an online to an        offline condition.        Messaging Telephone Number Format

The Messaging Telephone Number can be a structure that contains theinformation needed by the EM 241 Modem module to send a message. TheMessaging Telephone Number can be an ASCII string with a leading lengthbyte followed by ASCII characters. The maximum length of a MessagingTelephone Number can be 120 bytes (which includes the length byte).

The Messaging Telephone Number can contain up to 6 fields separated by aforward slash (/) character. Back-to-back slashes indicate an empty(null) field. Null fields can be set to default values in the EM 241Modem module.

Format: <Telephone Number>/<ID>/<Password/<Protocol>/<Standard>/<Format>

The Telephone Number field can be the telephone number that the EM 241Modem module dials when sending a message. If the message being sent isa text or SMS message, this can be the telephone number of the serviceprovider. If the message is a numeric page, this field can be the pagertelephone number. If the message is a CPU data transfer, this can be thetelephone number of the remote device. The maximum number of charactersin this field can be 40.

The ID can be the pager number or cellular telephone number. This fieldcan consist of the digits 0 to 9 only. If the protocol is a CPU datatransfer, this field can be used to supply the address of the remotedevice. Up to 20 characters can be allowed in this field.

The Password field can be used to supply the a password for messagessent via TAP if a password is required by the service provider. Formessages sent via UCP this field can be used as the originating addressor telephone number. If the message is a CPU data transfer to anotherModem module, this field can be used to supply the password of theremote Modem module. The password can be up to 15 characters in length.

The Protocol field can consist of one ASCII character which tells the EM241 Modem module how it should format and transmit the message. Thefollowing values can be allowed:

-   -   (a) Numeric paging protocol (default)    -   (b) TAP    -   (c) UCP command 1    -   (d) UCP command 30    -   (e) UCP command 51    -   (f) CPU data transfer

The Standard field can force the EM 241 Modem module to use a specificmodem standard. The standard field can be one ASCII character. Thefollowing values can be allowed:

-   -   (a) Bell 103    -   (b) Bell 212    -   (c) V.21    -   (d) V.22    -   (e) V.22 bit    -   (f) V.23c    -   (g) V.32    -   (h) V.32 bit    -   (i) V.34 (default)

The Format field can be three ASCII characters that specify the numberof data bits and parity to be used when transmitting the message. Thisfield does not necessarily apply if the protocol is set to numericpaging. In certain embodiments, only the following two settings areallowed:

-   -   (a) 8N1—8 data bits, no parity, one stop bit (default)    -   (b) 7E1—7 data bits, even parity, one stop bit        Text Message Format

The Text Message Format can define the format of text paging or SMSmessages. These types of messages can contain text and embeddedvariables. The text message can be an ASCII string with a leading lengthbyte followed by ASCII characters. The maximum length of a text messagecan be 120 bytes (which includes the length byte).

-   -   (a) Format: <Text><Variable><Text><Variable> . . .        The Text field can consists of ASCII characters.

The Variable field can define an embedded data value that the EM 241Modem module can read from the local CPU, formats, and place in themessage. The percent (%) character can be used to mark the start and theend of a variable field. The address and the left fields can beseparated with a colon. The delimiter between the Left and Right fieldscan be either a period or a comma and can be used as the decimal pointin the formatted variable. The syntax for the variable field can be:

-   -   (a) % Address:Left.Right Format %

The Address field can specify the address, data type and size of theembedded data value (i.e. VD100, VW50, MB20 or T10). The following datatypes can be allowed: I, Q, M, S, SM, V, T, C, and AI. Byte, word anddouble word sizes can be allowed.

The Left field can define the number of digits to display left of thedecimal point. This value can be large enough to handle the expectedrange of the embedded variable including a minus sign if needed. If Leftis zero the value can be displayed with a leading zero. The valid rangefor Left can be 0 to 10.

The Right field can define the number of digits to display right of thedecimal point. In certain embodiments, zeros to the right of the decimalpoint are always displayed. If Right is zero the number can be displayedwithout a decimal point. The valid range for Right can be 0 to 10.

The Format field can specify the display format of the embedded value.The following characters can be allowed for the format field:

-   -   (a) i—signed integer    -   (b) u—unsigned integer    -   (c) h—hexadecimal    -   (d) f—floating point/real        Example: “Temperature=% VW100:3.1i% Pressure=% VD200:4.3f%”        CPU Data Transfer Message Format

A CPU data transfer, either a CPU-to-CPU or a CPU-to-Modbus datatransfer, can be specified using the CPU Data Transfer Message Format. ACPU Data Transfer Message can be an ASCII string that can specify anynumber of data transfers between devices, up to the number ofspecifications that fit in the maximum message length of, for example,120 bytes (119 characters plus a length byte). An ASCII space can beused to separate the data transfer specifications, but is not required.All data transfer specifications can be executed within one connection.Data transfers can be executed in the order defined in the message. Ifan error is detected in a data transfer, the connection to the remotedevice can be terminated and subsequent transactions are not processed.

If the operation is specified as a read, Count number of words can beread from the remote device starting at the Remote_address, and thenwritten to V Memory in the local CPU starting at the Local_address.

If the operation is specified as a write, Count number of words can beread from the local CPU starting at the Local_address, and then writtento the remote device starting at Remote_address.

-   -   (a) Format: <Operation>=<Count>, <Local_address>,        <Remote_address>        The Operation field can consist of one ASCII character and can        define the type of transfer.    -   (a) R—Read data from the remote device    -   (b) W—Write data to the remote device

The Count field can specify the number of words to be transferred. Thevalid range for the count field can be 1 to 100 words.

The Local_address field can specify the V Memory address in the localCPU for the data transfer (i.e. VW100).

The Remote_address field can specify the address in the remote devicefor the data transfer (i.e. VW500). This address can be specified as a VMemory address even if the data transfer is to a Modbus device. If theremote device is a Modbus device, the conversion between V Memoryaddress and Modbus address can be as follows:

-   -   (a) Modbus address=1+(V Memory address/2)    -   (b) V Memory address=(Modbus address−1)*2        Example: R=20, VW100, VW200 W=50, VW500, VW1000 R=100, VW1000,        VW2000

Although the invention has been described with reference to specificembodiments thereof, it will be understood that numerous variations,modifications and additional embodiments are possible, and accordingly,all such variations, modifications, and embodiments are to be regardedas being within the spirit and scope of the invention. For example,although one specific embodiment utilized a telephone network, theutilization of other communication networks, such as the Internet, arealso within the spirit and scope of the invention. Also, referencesspecifically identified and discussed herein are incorporated byreference as if fully set forth herein. Accordingly, the drawings anddescriptions are to be regarded as illustrative in nature, and not asrestrictive.

1. A method, comprising: formatting a paging message according to apaging message specification provided by a programmable logiccontroller, the paging message comprising a data value determined from adata variable defined in the paging message specification, the pagingmessage formatted at a first modem directly connected to an expansionI/O bus of the programmable logic controller, the expansion I/O busdistinct from and not directly connected to a communications port of theprogrammable logic controller, the expansion I/O bus configured tocommunicatively connect to a plurality of I/O modules; and transmittingthe formatted paging message from the first modem via a telephonenetwork.
 2. A method, comprising: formatting a paging message accordingto a paging message specification provided by a programmable logiccontroller, the paging message comprising a data value determined from adata variable defined in the paging message specification, the pagingmessage formatted at a first modem directly connected to an expansionI/O bus of the programmable logic controller, the expansion I/O busdistinct from and not directly connected to a communications port of theprogrammable logic controller, the expansion I/O bus configured tocommunicatively connect to a plurality of I/O modules; and transmittingthe formatted paging message from the first modem via a communicationsnetwork.
 3. A method, comprising: formatting a message according to amessage specification provided by a programmable logic controller, themessage comprising a data value determined from a data variable definedin the message specification, the message formatted at a first modemdirectly connected to an expansion I/O bus of the programmable logiccontroller, the expansion I/O bus distinct from and not directlyconnected to a communications port of the programmable logic controller,the expansion I/O bus configured to communicatively connect to aplurality of I/O modules; and transmitting the formatted message fromthe first modem via a telephone network.
 4. The method of claim 3,further comprising obtaining a protocol via which to structure themessage.
 5. The method of claim 3, further comprising obtaining a modemstandard via which to transmit the message.
 6. The method of claim 3,further comprising transmitting the formatted message to a pager.
 7. Themethod of claim 3, further comprising transmitting the formatted messageto a pre-designated pager.
 8. The method of claim 3, further comprisingtransmitting the formatted message to a paging service.
 9. The method ofclaim 3, further comprising transmitting the formatted message to amessaging service.
 10. The method of claim 3, further comprisingtransmitting the formatted message to a cellular phone.
 11. The methodof claim 3, further comprising transmitting the formatted message to awireless device.
 12. The method of claim 3, further comprisingtransmitting the formatted message to a mobile terminal.
 13. The methodof claim 3, wherein the formatted message is a numeric paging message.14. The method of claim 3, wherein the formatted message is analphanumeric paging message.
 15. The method of claim 3, wherein theformatted message is a Short Message Service message.
 16. A method,comprising: formatting a message at a first modem directly connected toan expansion I/O bus of a first programmable logic controller, theexpansion I/O distinct from and not directly connected to acommunications port of the first programmable logic controller, theexpansion I/O bus configured to communicatively connect to a pluralityof I/O modules; and transmitting the formatted message from the firstmodem via a communications network.
 17. The method of claim 16, whereinthe communications network is the Internet.
 18. The method of claim 16,further comprising retrieving the message from the first programmablelogic controller.
 19. The method of claim 16, further comprisingreceiving the message from the first programmable logic controller. 20.The method of claim 16, further comprising receiving the message from aprocessor of the first programmable logic controller.
 21. The method ofclaim 16, further comprising reading the message.
 22. The method ofclaim 16, further comprising determining from the message a telephonenumber of a messaging provider.
 23. The method of claim 16, furthercomprising identifying data values specified within the message.
 24. Themethod of claim 16, further comprising retrieving data values specifiedwithin the message.
 25. The method of claim 16, further comprisingformatting data values specified within the message.
 26. The method ofclaim 16, further comprising placing data values within the message. 27.The method of claim 16, further comprising converting the message toASCII.
 28. The method of claim 16, further comprising obtainingconfiguration information via which to format the message.
 29. Themethod of claim 16, further comprising obtaining a pager number to whichto transmit the formatted message.
 30. The method of claim 16, furthercomprising obtaining a protocol via which to structure the message. 31.The method of claim 16, further comprising obtaining a modem standardvia which to transmit the message.
 32. The method of claim 16, furthercomprising transmitting the formatted message to a pager.
 33. The methodof claim 16, further comprising transmitting the formatted message to apre-designated pager.
 34. The method of claim 16, further comprisingtransmitting the formatted message to a paging service.
 35. The methodof claim 16, further comprising transmitting the formatted message to amessaging service.
 36. The method of claim 16, further comprisingtransmitting the formatted message to a cellular phone.
 37. The methodof claim 16, further comprising transmitting the formatted message to awireless device.
 38. The method of claim 16, further comprisingtransmitting the formatted message to a mobile terminal.
 39. The methodof claim 16, wherein the formatted message is a numeric paging message.40. The method of claim 16, wherein the formatted message is analphanumeric paging message.
 41. The method of claim 16, wherein theformatted message is a Short Message Service message.
 42. The method ofclaim 16, wherein the message is formatted in accordance with apre-selected format.
 43. The method of claim 16, wherein the message isformatted in accordance with a pre-determined format.
 44. The method ofclaim 16, wherein the message is formatted in accordance withTelelocator Alphanumeric Protocol (TAP).
 45. The method of claim 16,wherein the message is formatted in accordance with Universal ComputerProtocol (UCP).
 46. The method of claim 16, wherein the formattedmessage is transmitted via a modem standard selected from V.21, V.22,V.22bis, V.32, V.32bis, V.34, V.34bis, and V.90.
 47. The method of claim16, further comprising receiving a message specification from the firstprogrammable logic controller.
 48. The method of claim 16, furthercomprising reading a message specification.
 49. The method of claim 16,further comprising determining from a message specification a telephonenumber of a messaging provider.
 50. The method of claim 16, furthercomprising determining from a message specification data values toinclude within the message.
 51. The method of claim 16, furthercomprising determining from a message specification a format to apply tothe message.
 52. The method of claim 16, further comprising determiningfrom a message specification a protocol via which to transmit themessage.
 53. The method of claim 16, further comprising obtaining apager number to which to transmit the formatted message.
 54. A system,comprising: means for formatting a message at a modem directly connectedto an expansion I/O bus of a programmable logic controller, theexpansion I/O bus distinct from and not directly connected to acommunications port of the programmable logic controller, the expansionI/O bus configured to communicatively connect to a plurality of I/Omodules; and means for transmitting the formatted message from the modemvia a communications network.
 55. A computer-readable medium containingmachine executable instructions for activities comprising: formatting amessage at a first modem directly connected to an expansion I/O bus offirst programmable logic controller, the expansion I/O bus distinct fromand not directly connected to a communications port of the programmablelogic controller, the expansion I/O bus configured to communicativelyconnect to a plurality of I/O modules; and transmitting the formattedmessage from the first modem via a communications network.